package com.aaa.dem1101.deadlock;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/11/1  14:33
 */
public class Girl extends Thread{
    @Override
    public void run() {
        synchronized (LockObject.lock2){
            System.out.println(Thread.currentThread().getName()+"有画笔");
            synchronized (LockObject.lock1){
                System.out.println(Thread.currentThread().getName()+"有画板");
                System.out.println(Thread.currentThread().getName()+"可以画画了");
            }
        }
    }
}
